<%@ Page Language="C#" MasterPageFile="~/home.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="testresults.aspx.cs" Inherits="testresults" Title="Test Results" %>

<asp:Content ContentPlaceHolderID="head" Runat="Server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="200" valign="top" bgcolor="#e8eaed">
                <asp:Panel ID="panel_menulist" Width="100%" runat="server"></asp:Panel>
            </td>
            <td valign="top" style="padding-left:10px">
                <fieldset>
                    <legend style="font-size:15px;color:#F00">Test Results</legend>
                    <div style="font-size: 15px;color:#F00;text-align:center">
                        <b><asp:Label ID="lbl_msg" runat="server" Text=""></asp:Label></b>
                    </div>
                    <asp:GridView ID="mGridView" Width="100%" runat="server" BorderColor="#CC9966" BorderWidth="1px"
                        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                        GridLines="None" onselectedindexchanged="mGridView_SelectedIndexChanged">
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <Columns>
                            <asp:BoundField DataField="round" HeaderText="Round">
                                <ItemStyle HorizontalAlign="Center" Width="45px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="examtest" HeaderText="Exam Code" >
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="datetest" HeaderText="Date Test" >
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="timecompleted" HeaderText="Time Completed" >
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="status" HeaderText="Results" >
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:CommandField HeaderText="Details" SelectText="Details" 
                                ShowSelectButton="True">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:CommandField>
                        </Columns>
                        <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>                 
                </fieldset>
                
                <fieldset style="margin-top:10px" id="layout_details" runat="server" visible="false">
                    <legend style="font-size:15px;color:#F00">Details</legend>
                    <table width="100%">
                        <tr>
                            <td width="120" align="right">Exam Code</td>
                            <td width="30" align="center">:</td>
                            <td width="150"><asp:Label ID="lbl_examcode" runat="server"></asp:Label></td>
                            <td width="120" align="right">Results</td>
                            <td width="30" align="center">:</td>
                            <td><asp:Label ID="lbl_result" runat="server"></asp:Label></td>
                        </tr>
                        <tr>
                            <td align="right">Date Test</td>
                            <td align="center">:</td>
                            <td><asp:Label ID="lbl_datetest" runat="server"></asp:Label></td>
                            <td align="right">Time Completed</td>
                            <td align="center">:</td>
                            <td><asp:Label ID="lbl_timecompleted" runat="server"></asp:Label></td>
                        </tr>
                    </table>
                    <asp:GridView ID="mGridView_question" runat="server" CellPadding="4" Width="100%" AutoGenerateColumns="False"
                        ForeColor="#333333" GridLines="None">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="Number" HeaderText="Number">
                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Content">
                                <ItemTemplate>
                                    <%#Eval("Content") %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Answer" HeaderText="Answer">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="YourAnswer">
                                <ItemTemplate>
                                    <%#Eval("YourAnswer")%>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>

